//
//  THJMyFabuListCell.m
//  THJXHW
//
//  Created by 河南德艺 on 2018/10/10.
//  Copyright © 2018年 河南德艺. All rights reserved.
//

#import "THJMyFabuListCell.h"

@implementation THJMyFabuListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void)setContentWithDic:(NSDictionary*)dic Flag:(NSInteger)flag{
//    NSLog(@"cell-dic:%@",dic);
    if(flag == 1){
        self.shouxufei.hidden = self.shouxufeiTitle.hidden = NO;
        self.priceTitleLabel.text = @"价格";
        self.shouxufei.text = dic[@"fee"];
    }else{
        self.shouxufei.hidden = self.shouxufeiTitle.hidden = YES;
        self.priceTitleLabel.text = @"升贴水";
    }
    self.title.text = dic[@"pro_name"];
    self.time.text = dic[@"update_time"];
    self.price.text = [NSString stringWithFormat:@"￥%ld",[dic[@"price"] integerValue]];
    self.guige.text  = dic[@"type_name"];
    self.heyueLabel.text = dic[@"heyue"];
    self.number.text = [NSString stringWithFormat:@"%ld吨",[dic[@"num"] integerValue]];
    if([dic[@"status"] isEqual:@"1"]){
        self.imgView.image = kGetImage(@"noover");
    }else{
        self.imgView.image = kGetImage(@"overtime");
    }
}
- (IBAction)editAction:(id)sender {
    UIButton *button = (UIButton *)sender;
//    NSLog(@"%ld",button.tag);
    [self.delegate selectIndex:button.tag - 600];
}

@end
